//
//  SRBaseViewController.h
//  YWQF_APP
//
//  Created by 孙锐 on 2018/3/22.
//  Copyright © 2018年 孙锐. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NavBar.h"
#include <ifaddrs.h>
#include <arpa/inet.h>
#include <net/if.h>

#define IOS_CELLULAR    @"pdp_ip0"
#define IOS_WIFI        @"en0"
#define IOS_VPN         @"utun0"
#define IP_ADDR_IPv4    @"ipv4"
#define IP_ADDR_IPv6    @"ipv6"
@interface SRBaseViewController : UIViewController

@property (nonatomic,strong) NavBar *navBar;

//初始化方法 默认自定义显示导航栏
- (instancetype)initWithTitle:(NSString *)title needBack:(BOOL)needBack;

// 控制是否显示导航栏
- (instancetype)initWithTitle:(NSString *)title needBack:(BOOL)needBack needNavBar:(BOOL)needNavBar;

//基本设置
-(void)doBaseSettings;

//设置导航栏
-(void)doNavigationBarSettings;

//清空缓存数据
+ (void)resetDefaults;


//获取图片方法
-(void)chooseImage;
-(void)getImage:(UIImage *)image uploadUrl:(NSString *)url;

//修改行间距
- (void)changeLineSpaceForLabel:(UILabel *)label WithSpace:(float)space;

//处理图片渐变
-(void)setColor:(UIColor *)beginColor endColor:(UIColor *)endColor toView:(UIView *)view;

+(NSString *)uuidString;

+(NSString *)countNumAndChangeformat:(NSString *)num;

-(void)chooseImageWithoutEditing;
@end
